package com.thinkingstar.iads.cs.sys.entity;

import java.util.List;
import org.nutz.dao.entity.annotation.*;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;


/**
 * @author steelwoo.cn
 * @time   2012-9-13 上午10:54:04
 *
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Table("dc_sys_unit")
public class SysUnit  
{
	@Column
	@Name
    @ColDefine(type = ColType.VARCHAR, width = 100)
	private String id;
	@Column
    @ColDefine(type = ColType.VARCHAR, width = 100)
	private String name;
	@Column
    @ColDefine(type = ColType.VARCHAR, width = 20)
	private String unitcode;
	@Column
    @ColDefine(type = ColType.VARCHAR, width = 255)
	private String descript;
	@Column
    @ColDefine(type = ColType.VARCHAR, width = 100)
	private String address;
	@Column
    @ColDefine(type = ColType.VARCHAR, width = 20)
	private String telephone;
	@Column
    @ColDefine(type = ColType.VARCHAR, width = 100)
	private String email;
	@Column
    @ColDefine(type = ColType.VARCHAR, width = 100)
	private String website;
	@Column
	private int location;
	@Many(target = SysUser.class, field = "unitid")//一个单位下有N个用户
	private List<SysUser> users;

}